﻿Module ModuleWin32API

    Public Const IMAGE_BITMAP As Integer = 0
    Public Const IMAGE_CURSOR As Integer = 2
    Public Const IMAGE_ICON As Integer = 1

    Public Const LR_LOADFROMFILE As Integer = &H10
    Public Const LR_LOADTRANSPARENT As Integer = &H20

    Public Const ICON_BIG As Integer = 1
    Public Const ICON_SMALL As Integer = 0

    Public Const WM_SETICON As Integer = &H80

    Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, lParam As Int32) As Int32
    Public Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As IntPtr, ByVal lpsz As String, ByVal un1 As Int32, ByVal n1 As Int32, ByVal n2 As Int32, ByVal un2 As Int32) As Int32
    Public Declare Function LoadIcon Lib "user32" Alias "LoadIconA" (ByVal hInstance As IntPtr, ByVal lpIconName As String) As Long

    Public Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As Int32) As Int32
    Public Declare Function DestroyCursor Lib "user32" Alias "DestroyCursor" (ByVal hCursor As Int32) As Int32
    Public Declare Function DestroyIcon Lib "user32" Alias "DestroyIcon" (ByVal hIcon As Int32) As Int32

End Module